// 手册接口
import config from "./config";

var domain = config.getDomain;
var pageCount = config.getPageCount;

var DUIXIN_API =  domain + '/index.php?v=1&appid='+config.getAPPID+'&appsecret='+config.getAPPSECRET+'&';

export default  {
	// 导航
	getShouce_daohang(){
		var url = DUIXIN_API + '&s=shouce&c=daohang&m=index';
		return url;
	},
	// 手册列表
	getShouce_list(obj) {
		var url = DUIXIN_API + '&s=shouce&c=search&api_call_function=module_list&pagesize=' + pageCount + '&page=' + obj.page;
		if (obj.categories != 0) {
		  url += '&catid=' + obj.categories;
		} else if (obj.search != '') {
		  url += '&keyword=' + encodeURIComponent(obj.search);
		}
		return url;
	},
	// 手册详情列表
	getShouce_xiangqing() {
		var url = DUIXIN_API + '&s=shouce&c=shouce&m=index';
		return url;
	},
	// 手册详情内容
	getShouce_neirong() {
		var url = DUIXIN_API + '&s=shouce&c=neirong&m=index';
		return url;
	}
	
};